/*
 * @Author: Jieeeny
 * @Date: 2023-05-06 17:28:33
 * @LastEditors: Jieeeny
 * @LastEditTime: 2023-11-23 15:00:50
 * @Description: 控件字段
 * @FilePath: \vite-vue3-ts-pinia-vueuse\src\utils\elements.ts
 */
export const elements: ElementItem[] = [
  {
    type: 'input',
    name: '输入框',
    key: '',
    required: false,
    disabled: false,
    placeholder: '请输入',
    layout: '100%',
  },
  {
    type: 'select',
    name: '选择框',
    key: '',
    required: false,
    disabled: false,
    multiple: false,
    'allow-create': false,
    layout: '100%',
  },
  {
    type: 'date',
    name: '日期框',
    key: '',
    required: false,
    disabled: false,
    dateType: 'date',
    layout: '100%',
  },
  {
    type: 'radio',
    name: '单选框',
    key: '',
    required: false,
    layout: '100%',
  },
  {
    type: 'checkbox',
    name: '多选框',
    key: '',
    required: false,
    layout: '100%',
  },
  {
    type: 'table',
    name: '表格',
    key: '',
    required: false,
    layout: '100%',
  },
  {
    type: 'text',
    name: '文本',
    key: '',
    required: false,
    layout: '100%',
  },
  {
    type: 'textarea',
    name: '文本域',
    key: '',
    required: false,
    layout: '100%',
  },
  {
    type: 'descriptions',
    name: '描述列表',
    key: '',
    required: false,
    layout: '100%',
  },
  {
    type: 'upload',
    name: '附件',
    key: '',
    required: false,
    layout: '100%',
  },
];

export interface ElementItem {
  type: string;
  name: string;
  key: string;
  required: boolean;
  placeholder?: string;
  disabled?: boolean;
  multiple?: boolean;
  'allow-create'?: boolean;
  dateType?: string;
  layout: string;
}
